<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.is.util.ParamUtil"%>
<%@page import="java.util.HashMap"%>
<%@page import="com.is.datatransform.SelectOptionValue"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../resources/css/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../resources/js/jquery-1.8.1.js"></script>
<script type="text/javascript" src="../../resources/js/jquery.artDialog.js"></script>
<script type="text/javascript" src="../../resources/js/iframeTools.js"></script>
<title>Insert title here</title>
</head>
<body>
<%
         String getOps = ParamUtil.getString(request,"ops");
         String[] ops = getOps.trim().split(",");
         if(ops.length>0){
        	 HashMap<String,String> exportOps = new HashMap<String,String>();
        	 HashMap<String,String> allOps = SelectOptionValue.StudentOptions();
        	 for(String op:ops){
        		 exportOps.put(op,allOps.get(op));
        	 }
        	 session.removeAttribute("exportOps");
        	 session.setAttribute("exportOps",exportOps);
        	 session.removeAttribute("className");
        	 session.setAttribute("className","com.is.model.Student");
        	//request.getRequestDispatcher("../downloadFile.jsp").forward(request,response);
        	//不能用这个是因为会报getWriter has called fro this response
        	%>
        	<script>
        	window.location.href="/InterStu/servlet/ExportDo";
        	</script>
        	<%
         }else{
        	 %>
        	  <script>
	        			   $.dialog({
							    title: '导出学生信息',
							    content: '请选择要导出的列',
							    icon: 'warning',
							    ok: function(){
	        				   			history.go(-1);
							    }
							});
	        			   </script>
        	 <%
         }

%>
</body>
</html>